// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BOM_TECHNIC_ITEM
// * CreateDate    : 2014-06-05 18:29:40
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:40
// * LastChanger   : 2014-06-05 18:29:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class BomTechnicItemEntity : EntityBase
    {
        public BomTechnicItemTable TableSchema
        {
            get
            {
                return BomTechnicItemTable.Current;
            }
		}
		
		public BomTechnicItemEntity()
        {

        }
		
		public BomTechnicItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.BomTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_TECHNIC_ID"]));
			this.TechnicId = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_ID"]));
			this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.TechnicCode = Convert.ToString(CommonFunctions.ToObject(dr["Technic_Code"]));
			this.RateTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["Rate_time"]));
			this.ReadyTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["Ready_Time"]));
			this.CloseTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["Close_Time"]));
			this.StationType = Convert.ToString(CommonFunctions.ToObject(dr["Station_Type"]));
			this.EqptType = Convert.ToString(CommonFunctions.ToObject(dr["Eqpt_Type"]));
			this.TechnicName = Convert.ToString(CommonFunctions.ToObject(dr["Technic_Name"]));
            this.BaseQty = Convert.ToInt32(CommonFunctions.ToObject(dr["BASE_QTY"]));
        }
		
		public BomTechnicItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.BomTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_TECHNIC_ID"]));
			this.TechnicId = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_ID"]));
			this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.TechnicCode = Convert.ToString(CommonFunctions.ToObject(dr["Technic_Code"]));
			this.RateTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["Rate_time"]));
			this.ReadyTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["Ready_Time"]));
			this.CloseTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["Close_Time"]));
			this.StationType = Convert.ToString(CommonFunctions.ToObject(dr["Station_Type"]));
			this.EqptType = Convert.ToString(CommonFunctions.ToObject(dr["Eqpt_Type"]));
			this.TechnicName = Convert.ToString(CommonFunctions.ToObject(dr["Technic_Name"]));
            this.BaseQty = Convert.ToInt32(CommonFunctions.ToObject(dr["BASE_QTY"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BomTechnicItemTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_ID)); }
            set { SetData(BomTechnicItemTable.C_ID, value); }
        }
		
        [DataMember]
        public string BomTechnicId
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_BOM_TECHNIC_ID)); }
            set { SetData(BomTechnicItemTable.C_BOM_TECHNIC_ID, value); }
        }
		
        [DataMember]
        public string TechnicId
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_TECHNIC_ID)); }
            set { SetData(BomTechnicItemTable.C_TECHNIC_ID, value); }
        }
		
        [DataMember]
        public int Sequence
        {
            get { return Convert.ToInt32(GetData(BomTechnicItemTable.C_SEQUENCE)); }
            set { SetData(BomTechnicItemTable.C_SEQUENCE, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_DESCRIPTION)); }
            set { SetData(BomTechnicItemTable.C_DESCRIPTION, value); }
        }
		
        [DataMember]
        public string TechnicCode
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_Technic_Code)); }
            set { SetData(BomTechnicItemTable.C_Technic_Code, value); }
        }
		
        [DataMember]
        public decimal RateTime
        {
            get { return Convert.ToDecimal(GetData(BomTechnicItemTable.C_Rate_time)); }
            set { SetData(BomTechnicItemTable.C_Rate_time, value); }
        }
		
        [DataMember]
        public decimal ReadyTime
        {
            get { return Convert.ToDecimal(GetData(BomTechnicItemTable.C_Ready_Time)); }
            set { SetData(BomTechnicItemTable.C_Ready_Time, value); }
        }
		
        [DataMember]
        public decimal CloseTime
        {
            get { return Convert.ToDecimal(GetData(BomTechnicItemTable.C_Close_Time)); }
            set { SetData(BomTechnicItemTable.C_Close_Time, value); }
        }
		
        [DataMember]
        public string StationType
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_Station_Type)); }
            set { SetData(BomTechnicItemTable.C_Station_Type, value); }
        }
		
        [DataMember]
        public string EqptType
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_Eqpt_Type)); }
            set { SetData(BomTechnicItemTable.C_Eqpt_Type, value); }
        }
		
        [DataMember]
        public string TechnicName
        {
            get { return Convert.ToString(GetData(BomTechnicItemTable.C_Technic_Name)); }
            set { SetData(BomTechnicItemTable.C_Technic_Name, value); }
        }


        [DataMember]
        public int BaseQty
        {
            get { return Convert.ToInt32(GetData(BomTechnicItemTable.C_BASE_QTY)); }
            set { SetData(BomTechnicItemTable.C_BASE_QTY, value); }
        }
		#endregion
	}
	
	
}	

